﻿using System;

class AssignNullValues
{
    static void Main()
    {
        int? a = 5;
        Console.WriteLine("Prints int? a with value 5: {0}", a);
        a = null;
        Console.WriteLine("Prints int? a with value null: {0} ", a);

        double? b = 7.3;
        Console.WriteLine("Prints double? b with value 7.3 : {0}", b);
        b = null;
        Console.WriteLine("Prints double? b with value null: {0} ", b);

        int? c = 3;
        int? d = 2;
        Console.WriteLine("When adding nullabe int variables with values 3 and 2 the result is: {0}", c + d);
        int? e = null;
        Console.WriteLine("When adding nullable int variables with any value and null the result is null: {0}", c + e);

        double? f = 3.2;
        double? g = 2.6;
        Console.WriteLine("When adding nullabe double variables with values 3.2 and 2.6 the result is: {0}", f + g);
        double? h = null;
        Console.WriteLine("When adding nullable double variables with any value and null the result is null: {0}", f + h);
    }
}
